home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Burning & Media
/
GB-PVR 1.2.13
/
GBPVR10213.msi
/
Cabs.w1.cab
/
Logout.aspx.cs83
< prev
next >
Wrap
Text File
|
2008-01-03
|
2KB
|
83 lines
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace gbweb
{
/// <summary>
/// Summary description for Logout.
/// </summary>
public partial class Logout : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
Session["GuideStartTime"] = null;
getTheme();
FormsAuthentication.SignOut();
}
private void getTheme()
{
//Check to see if the theme has been set in session and that the set theme is using the table view
string theme = Convert.ToString(Session["theme"]);
if (theme != null && theme != "" && theme.Substring(0, 7) == "themes/")
{
return;
}
else
{
//Since the session theme variable was not set or is using the css view we need to read the value from the cookie
HttpCookie cookie = Request.Cookies["theme"];
if (cookie != null && cookie.Value.Length > 0)
{
theme = cookie.Value;
}
else
{
theme = "Default";
}
//Verify that that the theme in the cookie is available in the table based selections. If it is not found set the theme to Default.
if (File.Exists(HttpContext.Current.Server.MapPath("~/themes/") + theme + "/styles.css"))
{
Session["theme"] = "themes/" + theme;
}
else
{
Session["theme"] = "themes/Default";
}
return;
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
}
}